package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author fanYuLe
 * @Date 2023/3/2 12:13
 * @Blog blog.fanYuLe.net/996.mba
 * @Description:
 */
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {
    //分类列表
    List<Category> findAll();

    //新增菜品分类
    void save(Category category);

    //修改菜品分类
    void update(Category category);
    //根据分类查菜品数量
    Integer countDishByCategoryId(Long id);
    //根据分类查套餐数量
    Integer countSetmealByCategoryId(Long id);
    //根据id删除分类
    void deleteById(Long id);
}
